package o;

import java.io.ByteArrayOutputStream;
import java.io.Closeable;
import java.io.DataOutputStream;
import java.io.IOException;
import java.util.zip.GZIPOutputStream;

public class dms {
    public static byte[] ˋ(byte[] bArr) {
        ByteArrayOutputStream byteArrayOutputStream;
        Closeable dataOutputStream;
        Throwable e;
        Throwable th;
        Closeable closeable = null;
        try {
            byteArrayOutputStream = new ByteArrayOutputStream();
            try {
                dataOutputStream = new DataOutputStream(new GZIPOutputStream(byteArrayOutputStream, bArr.length));
            } catch (IOException e2) {
                e = e2;
                try {
                    Logger.ˋ("GZIPUtil", "gzip error!", e);
                    dnw.ˎ(closeable);
                    return byteArrayOutputStream.toByteArray();
                } catch (Throwable th2) {
                    th = th2;
                    dnw.ˎ(closeable);
                    throw th;
                }
            }
            try {
                dataOutputStream.write(bArr, 0, bArr.length);
                dataOutputStream.flush();
                dnw.ˎ(dataOutputStream);
            } catch (IOException e3) {
                e = e3;
                closeable = dataOutputStream;
                Logger.ˋ("GZIPUtil", "gzip error!", e);
                dnw.ˎ(closeable);
                return byteArrayOutputStream.toByteArray();
            } catch (Throwable th3) {
                th = th3;
                closeable = dataOutputStream;
                dnw.ˎ(closeable);
                throw th;
            }
        } catch (Throwable th4) {
            e = th4;
            byteArrayOutputStream = null;
            Logger.ˋ("GZIPUtil", "gzip error!", e);
            dnw.ˎ(closeable);
            return byteArrayOutputStream.toByteArray();
        }
        return byteArrayOutputStream.toByteArray();
    }
}
